package com.susu.zookeeper.curator.service;

import com.susu.zookeeper.curator.annotations.ZkLock;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * Zookeeper test
 *
 * @author 苏苏
 * @date 2020/11/6 16:19
 **/
@Slf4j
@Service
public class ZookeeperService {


    @ZkLock
    public void testLock() {
        System.out.println("无参锁");
    }

    @ZkLock(time = 2L, key = "#a")
    public void testLock2(String a) {
        System.out.println("有参锁,值:" + a);
    }
}
